﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Card.Security;

namespace Card.Web
{
    public class UserControlBasePage : System.Web.UI.UserControl
    {
        public Passport Passport
        {
            get
            {
                return ((Security.Page)this.Parent.Page).Passport;
            }
        }

        public Entity.Area Area
        {
            get
            {
                return ((BasePage)this.Parent.Page).Area;
            }
        }

        public Entity.Area ParentArea
        {
            get
            {
                return ((BasePage)this.Parent.Page).ParentArea;
            }
        }

        public string SiteDomain
        {
            get
            {
                return ((BasePage)this.Parent.Page).SiteDomain.TrimEnd('/');
            }
        }

        public string SiteName
        {
            get
            {
                return ((BasePage)this.Parent.Page).SiteName;
            }
        }
    }
}
